package top.infopub.mgr.hyp.service.impl;


import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import top.infopub.generic.GenericDao;
import top.infopub.generic.GenericServiceImpl;
import top.infopub.mgr.hyp.dao.HyPurviewDao;
import top.infopub.mgr.hyp.service.HyPurviewService;
import top.infopub.model.hy.Purview;


@Service
public class HyPurviewServiceImpl extends GenericServiceImpl<Purview, String> implements HyPurviewService {

    @Autowired
    private HyPurviewDao purviewDao;

    @Override
    public GenericDao<Purview, String> getDao() {
        return purviewDao;
    }

    @Override
    public boolean isNameExist(Purview param) {
        return purviewDao.isNameExist(param) > 0;
    }

    @Override
    public void delete(String[] checkboxId) {
        for (String id : checkboxId) {
            purviewDao.deleteByPrimaryKey(id);
        }
    }

}